package com.jwell.panrank.contract

import com.jwell.cargoapp.ui.base.IBaseView
import com.jwell.driverapp.tools.BaseSubscriber

/**
 * Created by 76577 on 2018/3/26.
 * 登录
 */
class LoginContract {
    interface View : IBaseView {

        fun loginFailed(message: String)

        fun loginSuccessful()

        fun setUserName(name: String?, passWorld: String?)

        fun sendMsgSuccess()

        fun loginByPhoneSuccess()
    }

    interface Presenter {
        fun login(userName: String, passWorld: String, isChecked: Boolean)

        fun sendMsgCode(phone :String,userSessionId:String,msgCode:String)

        fun loginByPhoneCode(usernameOrEmailAddress:String,phone:String,phoneCode:String)
    }

    interface Model {
        fun login(userName: String, passWorld: String, baseSubscriber: BaseSubscriber)

        fun sendMsgCode(phone :String,userSessionId:String,msgCode:String, baseSubscriber: BaseSubscriber)

        fun loginByPhoneCode(usernameOrEmailAddress:String,phone:String,phoneCode:String, baseSubscriber: BaseSubscriber)
    }
}